<script setup>
 defineProps(['goods'])
</script>

<template>
  <div class="goods-list">
    <img v-img-lazy="goods.picture ? goods.picture:'' "  alt=""/>
    <div class="goods-content">
      <h3 class="title">{{goods.name}}</h3>
      <span class="desc">{{goods.desc}}</span>
      <div class="price">
        <span class="price1">¥</span>
        <span class="price2">{{goods.price}}</span>
      </div>
    </div>
  </div>
</template>

<style scoped>
.goods-list {
  display: flex;
  gap: 0 8px;
  align-items: center;
  width: 220px;
  img {
    width: 80px;
    height: 80px;
  }
  .goods-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 80px;
    width: 120px;
    .title {
      font-weight: normal;
      font-size: 14px;
      width: 100%;
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
      overflow: hidden;
      text-overflow: ellipsis;
      line-height: 16px;
    }
    .desc {
      display: block;
      color: #979191;
      width: 100%;
      font-size: 12px;
      line-height: 12px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .price {
      color: red;
      .price1 {
        font-size: 10px;
      }
    }
  }
}
</style>
